package Task;

public class BankOfDalian extends Bank{

    public BankOfDalian(int year, double savedMoney) {
        super(year, savedMoney);
    }

    @Override
    public double computerInterest() {
        super.year = (int) year;
        double r = year- (int) year;
        int day = (int)(r*1000);
        double yearInterest = super.computerInterest();
        double dayInterest = day * 0.00012 * savedMoney;
        interest = yearInterest + dayInterest;
        System.out.printf("%f元存在大连银行%d年零%d天的利息: %f元\n", savedMoney,super.year,day,interest);
        return interest;
    }

}

